<template>
  <div>
    <to-search></to-search>
   <show-list :arr="arr"></show-list>
  </div>
</template>

<script>
import { reqlist } from "../../http/http";
export default {
  data() {
    return {
      // 1.初始值
      arr: [],
    };
  },
  mounted() {
    //2.请求数据
    reqlist({
      cateid: this.$route.query.id,
     
      type:this.$route.query.type?2:1,
    }).then((res) => {
      
      this.arr = res.data.list.goodData ? res.data.list.goodData : [];
    });
  },
};
</script>

<style lang="less" scoped>
@import "../../less/index.less";
a {
  background: @primary-light;
  margin: 0.1rem;
  padding: 0.1rem;
  border-radius: 0.1rem;
  display: flex;
}
a img {
  width: 1.5rem;
  height: 1.5rem;
}
a > div {
  flex: 1;
}
</style>